@layout("/common/_container.html"){
<link href="https://pynnn.oss-cn-hangzhou.aliyuncs.com/shop.css?v=20200718" rel="stylesheet">
<link href="https://pynnn.oss-cn-hangzhou.aliyuncs.com/doctor.css?v=20200718" rel="stylesheet">
<div class="ibox float-e-margins" style="height: 100%">
    <div class="ibox-content" id="addVisitedInfoForm" style="height: 100%;padding: 0;">
        <div id="isDealInfoForm" style="height: 100%;">
            <div style="display: none">
                <input id="arrears" value="0">
                <input type="hidden" id="sortMap" value="">
                <input type="hidden" id="tabId" value="${tabId}">
                <input type="hidden" id="id" value="${consultantInfo.id}">
                <input type="hidden" id="customerId" value="${customerId}">
                <input type="hidden" id="roleName" value="${roleName}">
                <input type="hidden" id="userName" value="${userName}">
                <input type="hidden" id="roleNameLogin" value="${roleNameLogin}">
                <input type="hidden" id="dealyesLogin" value="${dealyesLogin}">
                <input type="hidden" id="auditswitch" value="${auditswitch}">
                <input type="hidden" id="reservationsId" value="${consultantInfo.reservationsId}">
                <button type="button" class="btn" id="cancel" onclick="addVisitedInfoDlg.close()">取消</button>
                <input type="hidden" id="customerSexValue" value="${consultantInfo.sex}">
                <input type="hidden" id="isDorj" value="dd">
                <input type="hidden" id="arrivalTimeStr" value="${arrivalTimeStr}"/>
                <input type="hidden" id="isRefundAdminValue" value="${isRefundAdmin}">
            </div>
            <div class="shopHeader">
                <span style="font-size: 1.3em;font-weight: bolder;">${consultantInfo.customerName}</span>
                <span>${consultantInfo.customerAge}</span>
                <span>${consultantInfo.sex}</span>
                <span>电话：${consultantInfo.customerPhone}</span>
                <span>病历：${consultantInfo.medicalRecordNumber}</span>
                <span>现场TC：${customerInfo1.fieldTc}</span>
                <span>医生：${consultantInfo.doctor}</span>
                <span style="font-size: 1.3em;font-weight: bolder;">科室：${treatmentUnit}</span>
                <span style="font-size: 1.3em;font-weight: bolder;color: red;">${consultantInfo.isArrears}</span>
                <span><button class="btn returnBtn" type="button" style="right: 210px;" onclick="subsequent('${customerId}')">新建预约</button></span>
                <span><button class="btn returnBtn" type="button" style="right: 140px;" onclick="shortMessage('${customerId}')">短信</button></span>
                <span><button class="btn returnBtn" type="button" onclick="addVisitedInfoDlg.close()">返回上一级</button></span>
            </div>
            <div class="shopContent">
                <div class="nav_table" id="consultantInfoForm">
                    <ul class="nav nav-tabs nav_ul" role="tablist" id="navBox">
                        <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">患者信息</a></li>
                        <li role="presentation"><a href="#visit" aria-controls="visit" role="tab" data-toggle="tab">就诊记录</a></li>
                        <li role="presentation"><a href="#doctor" aria-controls="doctor" role="tab" data-toggle="tab">看诊记录</a></li>
                        <li role="presentation"><a href="#dealed" aria-controls="dealed" role="tab" data-toggle="tab">未结账记录</a></li>
                        <li role="presentation"><a role="tab" data-toggle="tab" href="#charge" aria-controls="charge">收费记录</a></li>
                        <li role="presentation"><a role="tab" data-toggle="tab" href="#profile" aria-controls="profile">病历</a></li>
                        <li role="presentation"><a role="tab" data-toggle="tab" href="#member" aria-controls="member">会员信息</a></li>
                        <li role="presentation"><a role="tab" data-toggle="tab" href="#settings" aria-controls="settings">TC回访记录</a></li>
                    </ul>
                    <div class="tab-content content_box" id="contentBox">
                        <div role="tabpanel" class="tab-pane active" id="home">
                            @layout("/tcCenter/consultant/consultant_informations.html"){
                            @}
                        </div>
                        <div role="tabpanel" class="tab-pane" id="doctor">
                            <div class="home_box" style="padding: 10px 10px 0;">
                                <div id="consultantInfoTitle"></div>
                                <div style="height: 100%;background: white;padding: 12px 20px;">
                                    <#sortDiagnosisDetail  id="sortDiagnosisDetail" list="${consultantInfoList}"/>
                                </div>
                            </div>
                        </div>
                        <div role="tabpanel" class="tab-pane" id="dealed">
                            @layout("/tcCenter/consultant/closing_entries.html"){
                            @}
                        </div>
                        <div role="tabpanel" class="tab-pane" id="visit">
                            <div class="home_box" style="padding: 10px 10px 0;">
                                <div style="height: 100%;background: white;padding: 12px 20px;">
                                    <#sortVisitDetail id="sortVisitDetail" list="${customerInfoList}"/>
                                </div>
                            </div>
                        </div>
                        <div role="tabpanel" class="tab-pane" id="charge">
                            @layout("/tcCenter/consultant/consultant_chargeDetails.html"){
                            @}
                        </div>
                        <div role="tabpanel" class="tab-pane" id="profile">
                            @layout("/doctorLooked/caseInfoPages.html"){
                            @}
                        </div>
                        <div role="tabpanel" class="tab-pane" id="member">
                            @layout("/tcCenter/consultant/consultant_member.html"){
                            @}
                        </div>
                        <div role="tabpanel" class="tab-pane" id="settings">
                            @layout("/tcCenter/consultant/tc_follows_reservations.html"){
                            @}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/tcCenter/consultant/addVisited_info.js?v=20200718"></script>
<script>
    var checkoutMethodHtml = "";
    $(function () {
        var tabId = parseInt($("#tabId").val());
        tabJump(tabId);
        var NoPayServiceInfoList = "${NoPayServiceInfoList}";
        if(NoPayServiceInfoList == "[]"){
            NoPayServiceInfoList = JSON.parse(NoPayServiceInfoList);
            if(NoPayServiceInfoList.length <= 0){
                var img = '<div style="position: absolute;top: 60%;left: 50%;transform: translate(-50%,-50%);"><img src="https://pynnn.oss-cn-hangzhou.aliyuncs.com/charges.png" alt=""></div>';
                $("#chargeContentE").html(img)
            }
        }
        var consultantInfoList = "${consultantInfoList}";
        if(consultantInfoList == "[]"){
            consultantInfoList = JSON.parse(consultantInfoList);
            if(consultantInfoList.length <= 0){
                var img = '<div style="position: absolute;top: 60%;left: 50%;transform: translate(-50%,-50%);"><img src="https://pynnn.oss-cn-hangzhou.aliyuncs.com/consult.png" alt=""></div>';
                $("#consultantInfoTitle").html(img)
            }
        }
        checkoutMethodHtml = "${checkoutMethodHtml}";
    });
    function tabJump(tabId) {
        $("#navBox li:eq(" + tabId + ") a").tab('show');
    }
    function checkIsYesterdayCust(){
        var arrivalTime = $("#arrivalTimeStr").val();
        var now = new Date();
        var time = now.getFullYear() + "-" +((now.getMonth()+1)<10?"0":"")+(now.getMonth()+1)+"-"+(now.getDate()<10?"0":"")+now.getDate();
        if(arrivalTime.indexOf(time)>=0){
            return true;
        }else{
            return false;
        }
    }
</script>
@}